/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package STUDENT.NGUYENSANG.OOPs.munsach;
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.Scanner;
/**
 *
 * @author NSPDL
 */
public class NhapBangQuanLi {
   static Scanner input=new Scanner(System.in);
    static List<BANGQL> BQL =new ArrayList<>(); 
    public boolean qua(int maS, int maBD)
    {
        int dem=0;
        for(BANGQL i: BQL)
        {
           if(i.getMaBanDoc()==maBD||i.getMaSach()==maS)
           {
               dem++;
           }
        }
        if(dem>5)return true;
        return false;
    }
    public BANGQL newBQL()
    {
        BANGQL bql=null;
        int maS=input.nextInt();
        int maBD=input.nextInt();
        int num=input.nextInt();
        if(num>3)
        {
            System.out.println("Khong Muon duoc 3 cuon sach nay :)");
        }else
        {
            bql=new BANGQL(NhapSach.S.get(maS),NhapBanDoc.BD.get(maBD),num);
        }
        return bql;
    }
    public void AddBQL()
    {
        BANGQL bql=newBQL();
        if(bql!=null)
        {
            BQL.add(bql);
        }
    }
}
